public static byte[] AESDecrypt(byte[] input, string Pass) { System.Security.Cryptography.RijndaelManaged AES = new System.Security.Cryptography.RijndaelManaged(); byte[] hash = new byte[32]; byte[] temp = new MD5CryptoServiceProvider().ComputeHash(System.Text.Encoding.ASCII.GetBytes(Pass)); Array.Copy(temp, 0, hash, 0, 16); Array.Copy(temp, 0, hash, 15, 16); AES.Key = hash; AES.Mode = System.Security.Cryptography.CipherMode.ECB; System.Security.Cryptography.ICryptoTransform DESDecrypter = AES.CreateDecryptor(); return DESDecrypter.TransformFinalBlock(input, 0, input.Length); }